package org.redis.cluster.transport.support;

import org.redis.cluster.transport.protocol.ProtocolOutput;
import org.redis.cluster.transport.session.Session;

public class ReplayingProtocolOutput implements ProtocolOutput {
	
	private ProtocolOutput output;
	
	public ReplayingProtocolOutput(ProtocolOutput output) {
		this.output=output;
	}

	@Override
	public boolean out(Session session, Object message) {
		session.getContext().remove(AbstractReplayingProtocolDecoder.POSITION_CONTEXT);
		return output.out(session, message);
	}

}